package cc.vv.baselibrary.view;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

import cc.vv.lklibrary.log.LogOperate;

/**
 * 解决异常报错的viewpager
 *
 * @author dup
 */

public class BtViewPager extends ViewPager {

    public BtViewPager(Context context) {
        super(context);
    }

    public BtViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            LogOperate.e(e.getMessage(), e);
            return false;
        }
    }
}
